<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Login {
    	
	// hier word in een sessie gekeken of de variable "is_logged_in" op "true" staat. 
    public function is_logged_in(){
		$CI =& get_instance();
		
		$CI->load->library('session');
		$is_logged_in = $CI->session->userdata('is_logged_in');
		if(!isset($is_logged_in) || $is_logged_in != true)
		{
			echo 'You don\'t have permission to access this page. <a href="../login">Login</a>';	
			die();		
			//$this->load->view('login_form');
		}		
	}
	
}

?>